#ifndef RRPRIM_H
#define RRPRIM_H

#include <cstdio>
#include "rrmath.h"
#include "rrray.h"
#include "rrmaterial.h"
#include "rrcrossinfo.h"

enum RRPRIMTYPE {RR_CUBOID, RR_PLANE, RR_QUADRIC};

class RRPrim
{
protected:
    RRPRIMTYPE type;
    RRVec3 size;
    RRVec3 coord;
    double degree_z;
    RRCrossInfo cross_info;

public:
    RRPrim();
    RRPRIMTYPE rrGetType();
    RRVec3 rrGetSize();
    RRVec3 rrGetCoord();
    double rrGetDegreeZ();
    void rrGetCrossInfo(RRCrossInfo *arg);
    void rrSetPrim(RRPrim *arg);
    void rrSetPrim(RRVec3 s, RRVec3 c);
    void rrSetPrim(RRVec3 s, RRVec3 c, double d);
    virtual void rrTrace(RRRay *ray, RRCrossInfo *arg) = 0;
};

#endif // RRPRIM_H
